// SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
// SPDX-License-Identifier: Mulan PSL v2
package com.geniusai.aip.auth.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.geniusai.aip.feature.common.utils.DateUtil;
import lombok.Data;

/**
 * @author hml14563
 * @date 2021/3/18
 */
@Data
@TableName(value = "password")
public class UserDO {

    @TableId(value = "email")
    private String email;

    @TableField(value = "hash")
    private Byte[] password;

    @TableField(value = "user_id")
    private String userId;

    @TableField(value = "username")
    private String username;

    @TableField(value = "role")
    private Integer role;

    @TableField(value = "cpu_num")
    private Float cpuNum;

    @TableField(value = "vgpu_memory")
    @JsonProperty("vGpuMemory")
    private Integer vgpuMemory;

    @TableField(value = "memory_size")
    private Integer memorySize;

    @TableField(value = "volume_size")
    private Integer volumeSize;

    @TableField(value = "s3_access_key")
    private String s3AccessKey;

    @TableField(value = "s3_encrypt_secret_key")
    private String s3EncryptSecretKey;

    @TableField(value = "s3_secret_key")
    private String s3SecretKey;

    @TableField(value = "update_time")
    private String updateTime;

    @TableField(value = "create_time")
    private String createTime;

    @TableField(value = "is_first_login")
    private Integer isFirstLogin;

    @TableField(value = "harbor_project_id")
    private Integer projectId;

    public UserDO() {
        this.updateTime = DateUtil.getDateTime();
        this.createTime = DateUtil.getDateTime();
    }

}
